package com.Object01.homework.homework05;

public class Teacher extends Person{
    private String work_age;

    public Teacher(String name, String sex, int age, String work_age) {
        super(name, sex, age);
        this.work_age = work_age;
    }

    public String getWork_age() {
        return work_age;
    }

    public void setWork_age(String work_age) {
        this.work_age = work_age;
    }
    public void teach(){
        System.out.println(getName()+"：我承诺，，，");
    }
    public void play(){
        System.out.println(getName()+"爱玩象棋");
    }

    public void aVoid() {
        System.out.println("老师信息:\n"+super.toString()+
                "学号:" + work_age);
        teach();
        play();
        System.out.println("---------------");
    }
}
